import Employee.*;
import People.*;

import java.util.Scanner;

public class TextDemo {
    public static Employee login(){
        Scanner scanner = new Scanner(System.in);
        System.out.println("HourlyEmployee》1");
        System.out.println("SalesEmployee》2");
        System.out.println("BasePlusSalesEmployee》3");
        int Num = scanner.nextInt();
        Employee[] e = new Employee[]{
                new HourlyEmployee(),
                new SalesEmployee(),
                new BasePlusSalesEmployee()
        };
        return e[Num-1];

    }


    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while(true){
            Employee e = login();
            System.out.println("请输入当前月份");
            System.out.println(e.getSalary(scanner.nextInt()));
            System.out.println("输入69退出||输入其他继续");
            if(scanner.nextInt()==69){
                break;
            }

        }

    }
}
